package com.bruan.d1_collection;

import java.util.ArrayList;
import java.util.HashSet;

public class CollectionTest1 {
    public static void main(String[] args) {
        // 确认集合特点
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("java");
        arrayList.add("java");
        arrayList.add("java");
        arrayList.add("java");
        arrayList.add("java");
        arrayList.add("java");
        System.out.println(arrayList);

        HashSet<String> hashSet = new HashSet<>();
        hashSet.add("java1");
        hashSet.add("java1");
        hashSet.add("java2");
        hashSet.add("java1");
        hashSet.add("java3");
        hashSet.add("java2");
        System.out.println(hashSet);

    }
}
